/*
===========================================================================
This source file is part of DyLab (Dynamic Laboratory)
For the latest info, see http://code.google.com/p/dylab/

Copyright (c) 2006-2008 Lukas Krejci
(krejci.lukas@volny.cz)

This file is part of DyLab.

    DyLab is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    DyLab is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DyLab.  If not, see <http://www.gnu.org/licenses/>.
===========================================================================
*/

#ifndef __dylab_ISimulationComponent_h__
#define __dylab_ISimulationComponent_h__

//===========================================================================================
#include <dylab/utils/components/IComponent.h>

//===========================================================================================
namespace dylab {    

    /** Common interface for all simulation component types.	 
	@remarks
		The components itself does not inherite from this class directly,
		but are rather derived from the respective simulation component type.
    */
    class DYLAB_EXPORT ISimulationComponent         
        : virtual public IComponent
    {
    public:

        /** Calls for component initialization.		 
		@remarks
			The derived component class should store the pointer to the parent simulation
			and initialize itself in a proper way.		 
		@param[in] _parentSimulation
			Pointer to the simulation this component is attached to.
        */
        virtual void initialize(Simulation * _parentSimulation) = 0;

        /** The derived component should return a pointer to the parent simulation.
		@returns 
			Pointer to the simulation this component is attached to.
		@note 
			This method will never be called before the call to the initialize() method.		 
        */
		virtual Simulation * getParentSimulation() = 0;

        /** The derived component should return a const pointer to the parent simulation.
		@returns 
			Pointer to the simulation this component is attached to.
		@note 
			This method will never be called before the call to the initialize() method.		 
        */
        virtual const Simulation * getParentSimulation() const = 0;
    };
}
//===========================================================================================
#endif // __dylab_ISimulationComponent_h__
